package com.gitee.gateway.handlers;

import com.gitee.service.openapi.OpenApiHandler;
import io.vertx.core.Handler;
import io.vertx.ext.web.RoutingContext;

/**
 * URL Router center
 */
public class Handlers implements OpenApiHandler {

    /**
     * openapi router
     *
     * @param category category
     * @param action   action
     * @return Handler
     */
    @Override
    public final Handler<RoutingContext> handle(String category, String action) {
        var h = switch (category) {
            case "hello" -> new HelloHandler(action);       // Demo
            default -> null;
        };
        return h;
    }

}
